home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
util2
/
fiflb381.lha
/
htag.s
< prev
next >
Wrap
Text File
|
1995-12-09
|
985b
|
60 lines
| FIFO-HANDLER HTAG.S for GCC, including startup code
| ATTENTION: Beware of pc@(label+2) bug in gas prior to 2.5.2!!!
| Simple startup code, not runnable from WorkBench
| Just handle _SysBase and _DOSBase
.text
.even
.globl _ENTRY
_ENTRY:
| need not save registers (GURU book 20.2.1.1)
movel sp,___ExitSP
movel 4:w,a6
movel a6,_SysBase
| OpenLibrary(dos)
lea pc@(LDOSname),a1
moveq #0,d0
jsr a6@(-0x228)
movel d0,_DOSBase
jeq L102 | 0 exit status when no Dos...
| call _main(void);
jbsr pc@(__main)
movel d0,d2
jra L101
.globl __exit
__exit:
movel sp@(4),d2
L101:
| CloseLibrary(dos)
movel _SysBase,a6
movel _DOSBase,a1
jsr a6@(-0x19e)
movel d2,d0
L102:
movel ___ExitSP,sp
rts
LDOSname:
.ascii "dos.library\0"
.data
.even
.comm ___ExitSP,4
.comm _SysBase,4
.comm _DOSBase,4
| Support for software int to transfer packet from
| private port to IoSink
.text
.even
.globl _AIntCode
_AIntCode:
movel a1,sp@-
jsr pc@(_IntCode)
movel sp@+,a1
rts